@extends('home.cloud.base')
@section('con')
<style type="text/css">
	center{
		font-size:18px;
		color:#80FFFF;
	}
</style>
<center>
	<form action="" method="post" name="myform">
		<input type="hidden" name="_token" value="{{ csrf_token() }}">
		<input type="hidden" name="_method" value="DELETE">
	</form>
	<table border="1" style="width:80%;background:#D4D4D4">
		<caption><a href="{{ url('/home/addre/create') }}" style="background:#182546">&nbsp;&nbsp;添加&nbsp;&nbsp;</a>我的通讯录</caption>
		<tr>
			<td align="center">好友名字</td>
			<td align="center">好友手机</td>
			<td align="center">操作</td>
		</tr>
		@foreach($list as $v)
		<tr>
			<td align="center">{{ $v->username }}</td>
			<td align="center">{{ $v->phonel }}</td>
			<td align="center">
				<a href="javascript:doDel({{ $v->cloudid }})">删除</a>&nbsp;|&nbsp;
              	<a href="/home/addre/{{ $v->cloudid }}/edit">修改</a>
            </td>  
		</tr>
		@endforeach
	</table>
	<script type="text/javascript">
		function doDel(id)
		{
			if(confirm('确定要删除吗???')){
				var form = document.myform;
				form.action = '/home/addre/'+id;
				form.submit();
			}
		}
	</script>
</center>
@stop
